class Student implements Comparable {
	String number
    String name
    String address
    String bloodType
    SortedSet teachers
    static hasMany = [teachers: Teacher]
    static belongsTo = Teacher
    
    static constraints = {
		number(unique: true)
        name()
        address()
        bloodType(inList: ['Type-A', 'Type-B', 'Type-AB', 'Type-O'])
    }
    
    String toString() {
        "$number:$name"
    }
	
    int compareTo(obj) {
    	number.compareTo(obj.number)
    }
}
